<!DOCTYPE doctype HTML>
<html>
 <head>
  <meta charset="utf-8">
   <title>
    Chart Downloader Plug-in for OpenCPN
   </title>
   <link href="github.min.css" rel="stylesheet">
    <script src="highlight.min.js">
    </script>
    <script>
     hljs.initHighlightingOnLoad();
    </script>
    <script src="MathJax.js" type="text/javascript">
    </script>
    <script type="text/javascript">
     MathJax.Hub.Config({"showProcessingMessages" : false,"messageStyle" : "none","tex2jax": { inlineMath: [ [ "$", "$" ] ] }});
    </script>
    <style type="text/css">
     body{font:16px Helvetica,Arial,sans-serif;line-height:1.4;color:#333;word-wrap:break-word;background-color:#fff;padding:10px 15px}strong{font-weight:700}h1{font-size:2em;margin:.67em 0;text-align:center}h2{font-size:1.75em}h3{font-size:1.5em}h4{font-size:1.25em}h1,h2,h3,h4,h5,h6{font-weight:700;position:relative;margin-top:15px;margin-bottom:15px;line-height:1.1}h1,h2{border-bottom:1px solid #eee}hr{height:0;margin:15px 0;overflow:hidden;background:0 0;border:0;border-bottom:1px solid #ddd}a{color:#4183C4}a.absent{color:#c00}ol,ul{padding-left:15px;margin-left:5px}ol{list-style-type:lower-roman}table{padding:0}table tr{border-top:1px solid #ccc;background-color:#fff;margin:0;padding:0}table tr:nth-child(2n){background-color:#aaa}table tr th{font-weight:700;border:1px solid #ccc;text-align:left;margin:0;padding:6px 13px}table tr td{border:1px solid #ccc;text-align:left;margin:0;padding:6px 13px}table tr td :first-child,table tr th :first-child{margin-top:0}table tr td:last-child,table tr th :last-child{margin-bottom:0}img{max-width:100%}code{padding:0 5px;background-color:#d3d3d3}blockquote{padding: 0 15px;border-left:4px solid #ccc}
    </style>
   </link>
  </meta>
 </head>
 <body id="MathPreviewF">
  <h2 id="advanced-usage">
   Advanced Usage
  </h2>
  <p>
   The chart downloader plugin is a handy tool that can automatically use the Internet to keep your free charts up to date. No longer do you have to go to a web site, download large .zip files then manually unzip them. The plugin will do all that work for you. A bonus feature is that it only downloads charts that have changed since the last time you udpated chart files which can reduce the amount of data downloaded. This tool is just a way to automatically download charts. The plugin does not change the way OpenCPN works and you don’t have to use it to manage your charts at all, it just makes managing your charts easier once you have a working Internet connection.
  </p>
  <p>
   Existing OpenCPN users will no doubt already have charts and they may wish to have the downloader plugin keep these existing charts up to date. Below we explain how the downloader works so that you can utilize it to automatically update your existing charts.
  </p>
  <h3 id="the-chart-directory-structure">
   The Chart Directory Structure
  </h3>
  <p>
   The plugin by default assumes you keep your charts in a multilevel directory tree, separating charts both by type (raster/vector) and by the coverage area. While it is not needed, we strongly suggest you adopt this scheme as it
  </p>
  <pre><code>Charts top level folder
   |-ENC
      |-Some area
      |-Another area
   |-RNC
      |-Some area
      |-Another area
      |-Yet another are
</code></pre>
  <p>
   By default the plugin places all your chart bellow
   <code>
    &lt;Your documents folder&gt;\Charts
   </code>
   . In case you don’t like the location, you can change it in the plugin preferences dialog. Get to it by
   <strong>
    Options
   </strong>
   &gt;
   <strong>
    Plugins
   </strong>
   &gt;
   <strong>
    ChartDownloader
   </strong>
   &gt;
   <strong>
    Preferences
   </strong>
   after you enable the plugin.
  </p>
  <p>
   <img alt="Preferences" src="preferences.png"/>
  </p>
  <p>
   The Default Path to Charts tells the downloader the top level directory where all your charts are stored. This default path will be used along with any additional subdirectories defined for each chart catalog to define the entire path to charts.
  </p>
  <h3 id="other-settings">
   Other settings
  </h3>
  <p>
   Most existing users will want to select the check box labeled
   <strong>
    All updated charts
   </strong>
   so that is the default. This tells the downloader that you want to download any charts that are newer than the charts you have. You can also select
   <strong>
    All new charts
   </strong>
   . This will tell the downloader that we also want to automatically download any new charts that don’t already exist. Before selecting that we recommend that you read through this documentation and then decide if you need that option or not. Most existing users don’t need to use that option.
  </p>
  <p>
   This may seem a little confusing at first so let’s look at an example. Assume you have entered the Default Path to Charts as C:\Users\Dan\Documents\Charts. Then go to the “Predefined” charts tab by selecting
   <strong>
    Options
   </strong>
   &gt;
   <strong>
    Charts
   </strong>
   &gt;
   <strong>
    Chart Downloader
   </strong>
   &gt;
   <strong>
    Add Catalog
   </strong>
   then select the “Predefined” tab. There you will find a tree of predefined chart catalogs. One of these is the
   <strong>
    USA - NOAA and Inland Charts
   </strong>
   &gt;
   <strong>
    RNC
   </strong>
   &gt;
   <strong>
    by Region
   </strong>
   &gt;
   <strong>
    Region 02 - Block Island, RI to Canadian Border
   </strong>
   . If you click it you will see something like this:
  </p>
  <p>
   <img alt="Add New Chart Catalog Source" src="04-AddNewChartSource-Predefined.png"/>
  </p>
  <p>
   Many users will have all their existing raster charts stored in one directory called BSB_ROOT and vector charts in one directory called ENC_ROOT. In the above example there is no BSB_ROOT directory and you may be wondering why not. The large .zip files from NOAA have BSB_ROOT or ENC_ROOT as their top level so it will be easier to combine multiple .zip files into a single directory structure. If you unzipped multiple files into the same directory then all your chart files will be in one big directory called BSB_ROOT or ENC_ROOT.
  </p>
  <p>
   If you already have some region 2 charts in a directory called BSB_ROOT and you want to keep them up to date just click on the Browse button or edit the path in
   <strong>
    Chart Directory
   </strong>
   so that it points to the BSB_ROOT or whatever the directory name where region 2 charts are stored now. Then click OK and you are ready to update your region 2 raster charts.
  </p>
  <p>
   After clicking OK you will be back at the main plugin screen. Click the button on the right labeled
   <strong>
    Update
   </strong>
   . This will check your existing charts against the current NOAA region 2 database. Any existing charts that are out of date will be marked with a check box and the status will show
   <strong>
    Update available
   </strong>
   . Any charts that are not in your chart folder will show status as
   <strong>
    New
   </strong>
   . The rest will show status
   <strong>
    Up to date
   </strong>
   . If you want to get some new charts scroll through the list of charts. Click the check box of any new charts you would like to see.
  </p>
  <p>
   Download all the charts with a check box by clicking the button at the bottom labeled
   <strong>
    Download selected charts
   </strong>
   .
  </p>
  <p>
   If the status shows
   <strong>
    New
   </strong>
   for every chart you will get a message that no charts were selected for download. In that case you may not have gotten the chart directory right. You can edit the chart directory by clicking the button labeled
   <strong>
    Edit…
   </strong>
   . This brings up a dialog box similar to the Add Catalog button except you can edit the Name, URL and Chart Directory. Be careful if you change the URL because if the wrong URL is given the chart downloader will not be able to find the NOAA chart catalog. Once you have the Chart Directory correct click OK then
   <strong>
    Update
   </strong>
   followed by
   <strong>
    Download selected charts
   </strong>
   . All your existing charts for region 2 will be updated to the latest revision.
  </p>
  <p>
   Once you have downloaded charts, the plugin sets OpenCPN to scan for new and updated charts and update it's chart database once you close the Toolbox.
  </p>
  <h3 id="existing-users-have-two-options">
   Existing Users have Two Options
  </h3>
  <p>
   You can keep all your charts updated in their existing directories (typically two directories called BSB_ROOT and ENC_ROOT) or you can keep each group of charts in separate directories. This latter choice is what the downloader does by default. It puts charts from each new source into a new directory beneath the
   <strong>
    Default Path to Charts
   </strong>
   in
   <strong>
    Preferences
   </strong>
   . There is a good reason to use this scheme as it makes defining groups of charts in OpenCPN much more straightforward.
  </p>
  <p>
   If you want to keep your charts in their existing directories then when adding each catalog simply change the
   <strong>
    Chart Directory
   </strong>
   so it points to the BSB_ROOT or ENC_ROOT or whatever directory your chart files are in now. If your existing charts are in two big directories (ENC_ROOT and BSB_ROOT) you may wish to add just the catalogs ALL RNCs and ALL ENCs. Make sure the
   <strong>
    Chart Directory
   </strong>
   for each one points to the correct root directory (e.g. BSB_ROOT or ENC_ROOT).
  </p>
  <p>
   The plugin tries to save you all the work with setting up OpenCPN to see your charts when you configure the catalogs. If you decide to later change the directory structure for your charts, make sure to adjust the respective configuration on
   <strong>
    Options &gt; Charts &gt; Chart Files
   </strong>
   tab.
  </p>
  <p>
   That’s pretty much all there is to setting up the downloader for existing charts. Next we look at how to keep your chart catalogs up to date.
  </p>
  <p>
   Once you have everything set up the way you like there is a one-button update process available. As it might be confusing for new users, the function is disabled by default and you have to enable it in the plugin preferences by ticking the
   <strong>
    Allow bulk update of all configured chart sources and charts
   </strong>
   checkbox. A new button, labeled
   <strong>
    Update All
   </strong>
   appears on the Chart Downloader tab. This button will update each catalog starting from the first one and then download any updated charts according to the Preferences check boxes. Usually this will be
   <strong>
    All updated charts
   </strong>
   . If you want to get all new charts automatically with one-button update then select
   <strong>
    All new charts
   </strong>
   in Preferences too.
  </p>
  <h3 id="custom-chart-sources">
   Custom Chart Sources
  </h3>
  <p>
   The plugin allows definition of completely customized chart sources. If you want to make your own set of charts available to be managed by the plugin, you will have to create your own XML chart catalog and make it available on a webserver. Refer to
   <a href="https://github.com/chartcatalogs/catalogs">
    https://github.com/chartcatalogs/catalogs
   </a>
   for examples of catalogs covering the non-US charts available.
   <br/>
   To configure the plugin to use your chart catalog, click the “
   <strong>
    Add
   </strong>
   ” button, go to the
   <strong>
    Custom
   </strong>
   tab and enter the URL of you catalog and the destination directory for your charts.
  </p>
  <p>
   <img alt="Add-Edit New Custom Chart Source" src="12-Add-Edit-Custom-Chart-Source.png"/>
  </p>
 </body>
</html>
